<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>楼盘展示管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function remark(fh) {
			$.ajax({
				type:"post",
				url: "${ctx}/ta/xtLoupan/getx",
				data:{"fh":fh},
				dateType:"json",
				success:function(result){
					if(result != null){
						$('[name="lch"]').val(result.lch);
						$('[name="fh"]').val(result.fh);
						$('[name="fwlx"]').val(result.fwlx);
						$('[name="fx"]').val(result.fx);
						$('[name="ycjzmj"]').val(result.ycjzmj);
						$('[name="scjzmj"]').val(result.scjzmj);
						$("#remark").css("display", "block");
					}
				},
				error:function(date){
					alert(JSON.stringify(date));
				}
			}); 
		}
		function remarkOff() {
			$("#remark").css("display", "none");
		}
	</script>
	<style type="text/css">
#remark {
	margin-left: 20%;
	margin-top: 10%;
	width: 400px;
	height: 250px;
	background-color: #fff;
	border: 1px solid #ccc;
	position: fixed;
	left: 0;
	top: 0;
}
</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active">
			<a href="${ctx}/ta/xtLoupan/">楼盘信息展示</a>
		</li>
	</ul>
	<sys:message content="${message}"/>
	<div align="center">
		<div align="left">
				<c:forEach var="map" items="${map}">
					<input style="background-color: ${map.value};border: none;width: 20px;height: 10px;" readonly="readonly" />${map.key}
				</c:forEach>
		</div>
		<h3>楼盘信息展示</h3>
		<table class="table table-striped table-bordered table-condensed">
			<c:if test="${lp != null}">
				<c:forEach var="l" items="${louceng}">
					<tr align="center">
						<td>${l}</td>
						<c:forEach items="${lp}" var="lp">
							<c:if test="${lp.lch == l}">
								<td style="background-color: ${map[lp.fwlx]};">
									<div align="center"><a href="javascript:remark(${lp.fh})">${lp.fh}</a></div>
								</td>
							</c:if>
						</c:forEach>
					</tr>
				</c:forEach>
			</c:if>
		</table>
	</div>
	<div id="remark" style="display: none;">
		<h4 align="center" style="margin-top: 2%">房屋信息：</h4>
		<input type="button" value="X"
			style="float: right; margin-top: -28px; background-color: #fff; border: none;"
			onclick="remarkOff()" />
		<div align="left" style="width: 360px; height: 200px; border: 1px solid #ccc; margin-left: 5%; margin-top: 1%">
			<table>
				<tr>
					<td>楼层号：</td>
					<td><input readonly="readonly" name="lch" /></td>
				</tr>
				<tr>
					<td>房间号：</td>
					<td><input readonly="readonly"  name="fh" /></td>
				</tr>
				<tr>
					<td>房屋类型：</td>
					<td><input readonly="readonly"  name="fwlx" /></td>
				</tr>
				<tr>
					<td>户型：</td>
					<td><input readonly="readonly"  name="fx" /></td>
				</tr>
				<tr>
					<td>预测建筑面积：</td>
					<td><input readonly="readonly" name="ycjzmj" />平方米</td>
				</tr>
				<tr>
					<td>实测建筑面积：</td>
					<td><input readonly="readonly" name="scjzmj" />平方米</td>
				</tr>
			</table>
		</div>
	</div>
</body>
</html>